/***************************************************************************
 * 文件名:RolesDTO.java<br>
 * 版本: <br>
 * 描述: <br>
 * 版权所有: <br>
 * //////////////////////////////////////////////////////// <br>
 * 创建者: robo<br>
 * 创建日期: 2010-12-5 <br>
 * 修改者: <br>
 * 修改日期: <br>
 * 修改说明: <br>
 **************************************************************************/
package com.sunwayhorizo.health.business.dto.security;

import java.io.Serializable;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

public class RoleDTO implements Comparable<RoleDTO> ,Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	// 主键
	private String roleId;

	// 角色名称
	private String roleName;

	// 角色code
	private String roleCode;

	// 备注
	private String description;

	// 工作类型
	private String jobCode;

	private String jobTitleName;

	// 工资类型代码
	private String salaryTypeCode;

	// 工资数量
	private String salaryQuantity;

	// 父角色DTO
	private String parentId;

	// 子角色
	private List<RoleDTO> children=new ArrayList<RoleDTO>();

	// 权限列表
	private List<String> permissionIds=new ArrayList<String>();

	@Override
	public String toString() {
		return "RoleDTO [\n主键=" + roleId + ",\n 角色名称=" + roleName
				+ ",\n 角色code=" + roleCode + ",\n 备注=" + description
				+ ",\n 工作类型=" + jobCode + ",\n 工作主题=" + jobTitleName
				+ ",\n 工资类型代码=" + salaryTypeCode + ",\n 工资数量=" + salaryQuantity
				+ ",\n 父角色DTO=" + parentId + ",\n 子角色=" + children
				+ ",\n 权限列表=" + permissionIds + "]";
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getJobCode() {
		return jobCode;
	}

	public void setJobCode(String jobCode) {
		this.jobCode = jobCode;
	}

	public String getJobTitleName() {
		return jobTitleName;
	}

	public void setJobTitleName(String jobTitleName) {
		this.jobTitleName = jobTitleName;
	}

	public String getSalaryTypeCode() {
		return salaryTypeCode;
	}

	public void setSalaryTypeCode(String salaryTypeCode) {
		this.salaryTypeCode = salaryTypeCode;
	}

	public String getSalaryQuantity() {
		return salaryQuantity;
	}

	public void setSalaryQuantity(String salaryQuantity) {
		this.salaryQuantity = salaryQuantity;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public List<RoleDTO> getChildren() {
		return children;
	}

	public void setChildren(List<RoleDTO> children) {
		this.children = children;
	}

	public List<String> getPermissionIds() {
		return permissionIds;
	}

	public void setPermissionIds(List<String> permissionIds) {
		this.permissionIds = permissionIds;
	}

	@Override
	public int compareTo(RoleDTO roleDTO) {
		Comparator cmp=Collator.getInstance(java.util.Locale.CHINA);
		return cmp.compare(this.roleName,roleDTO.getRoleName());
	}
}
